import request from '@/router/axios';

/**
 * @param current 当前页
 * @param size 每页数据量
 * @returns {AxiosPromise}
 */
// export const getParentList = (current, size,params) => {
//   return request({
//     url: '/api/hg-public/blade-basic/classes/page',
//     method: 'get',
//     params: {
//       ...params,
//       current,
//       size,
//     }
//   })
// }
export const getParentList = (current, size,params) => {
  return request({
    url: '/api/hg-public/produceline/produceClassPage',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

// export const getChildList = (current, size, params) => {
//   return request({
//     url: '/api/hg-public/blade-basic/classeslist/page',
//     method: 'get',
//     params: {
//       ...params,
//       current,
//       size,
//     }
//   })
// }

export const getChildList = (current, size, params) => {
  return request({
    url: '/api/hg-public/produceline/ClassDetail',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

// export const add = (row) => {
//   return request({
//     url: '/api/hg-public/blade-basic/classes/submit',
//     method: 'post',
//     data: row
//   })
// }
export const add = (row) => {
  return request({
    url: '/api/hg-public/produceline/saveClasses',
    method: 'post',
    data: row
  })
}

// export const remove = (ids) => {
//   return request({
//     url: '/api/hg-public/blade-basic/classes/remove',
//     method: 'post',
//     params: {
//       ids,
//     }
//   })
// }

